<h3>What needs to be done?</h3>
	<div class="padding5"></div>
	<?php 
		$pid = Yii::app()->request->getParam("pid");
		$form = $this->beginWidget('CActiveForm',array(
			'id'=>'add-task',
    		'enableAjaxValidation'=>true,
    		'enableClientValidation'=>true,
    		'action'=>array('/tasks/add','pid'=>$pid),
		));
		echo Chtml::activeHiddenField($model, 'task_task_list_id',array(
			'id'=>'tl-id',
		));
		echo $form->textField($model,'task_name',array(
			'class'=>"addTaskName",
			'style'=>"width: 60%",
		));
		echo $form->error($model,'task_name');
	?>
    			
    		<div id="priority" style="float:right;">
    			Priority 
    			<?php echo Chtml::activeDropDownList($model, 'task_priority', $model->listPriority()); ?>
    		</div>
    				<div class="padding5"></div>
    				<p>Who should do this?</p>
    				<?php 
    					echo Chtml::checkBoxList('list-user', null, User::listUser($pid),array());
    				?>
    				<p>Complete by ?</p>
    				
    				<?php 
    					echo $form->textField($model,'task_completed_date',array(
    						'class'=>"addTaskTime",
    						'style'=>"width: 30%",
    					));
    					echo $form->error($model,'task_completed_date');
    					
    					echo '
    						<div class="padding5"></div>
    						<p>Description</p>
    					';
    					echo $form->textArea($model,'task_description',array(
    						'rows'=>"4",
    						'cols'=>"70",
    					));
    					echo '<div class="padding5"></div>';
    					echo '<div class="postButton">';
    						echo Chtml::submitButton("Add this task");
    						echo 'or';
    						echo '<a href="#" class="popupCancel" >Cancel</a>';
    					echo '</div>';
    				?>
	<?php $this->endWidget();?>